<?php
	class riaSpamBotBlocker extends  formSpamBotBlocker
	{
		function __construct(			
			$initKey="", // set some string here to make the encoded names and values hard to guess 
			$params = array())
			//$minutesAfterMidnight=20, // minutes after midnight to allow a submission of a form generated at the previous day
			//$minTime=2, // time in seconds needed to have passed, before o form can be submitted, set also by setTimeWindow()
			//$maxTime=600, // max time in seconds to submit a form, set also by setTimeWindow()
			//$hasTrap=true, // true: a visually hidden input tag will be generated, set also by setTrap()
			//$trapName="email", // name of the visually hidden input tag, set also by setTrap()
			//$trapLabel="Do not enter anything in this text box otherwise your message will not be sent!", // label info to warn human users, who do not use CSS, set also by setTrap()
			//$hasSession=true // enables a session based method to prevent multiple submissions with the same parameters
		{
			if ($initKey){
				$this->initKey = $initKey;
			}elseif ($options['spam_bot_blocker']['init_key']){
				$this->initKey = $options['spam_bot_blocker']['init_key'];
			}else {
				$this->initKey = "default_gjybvft234678978ntcerb";
			}
			
			$this->trapName="email_field";
			
			if (count($params))
			{
				if (isset($params['minutesAfterMidnight'])){
					$this->minutesAfterMidnight=$params['minutesAfterMidnight'];
				}
				
				if (isset($params['minTime'])){
					$this->minTime=$params['minTime'];
				}
				
				if (isset($params['maxTime'])){
					$this->maxTime=$params['maxTime'];
				}
				
				if (isset($params['hasTrap'])){
					$this->hasTrap=$params['hasTrap'];
				}
				
				if (isset($params['trapName'])){
					$this->trapName=$params['trapName'];
				}
				
				if (isset($params['trapLabel'])){
					$this->trapLabel=$params['trapLabel'];
				}
				
				if (isset($params['hasSession'])){
					$this->hasSession=$params['hasSession'];
				}
			}

			$this->hasSession=false;		
		}
	}
?>